package com.jiayinlending.jiayindai.adapter;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;

import com.jiayinlending.jiayindai.R;
import com.jiayinlending.jiayindai.activity.mine.loanrecord.ScheduleDetailsActivity;
import com.jiayinlending.jiayindai.adapter.base.BaseRecyclerViewAdapter;
import com.jiayinlending.jiayindai.adapter.viewholder.LoanRecordRecylerHolder;
import com.jiayinlending.jiayindai.net.bean.Info;

import java.util.List;

/**
 * Created by xiaohei on 2017/4/21.
 */

public class LoanRecordAdpater extends BaseRecyclerViewAdapter<LoanRecordRecylerHolder, Info> {
    public LoanRecordAdpater(Context context, List<Info> data) {
        super(context, data);
    }

    @Override
    public LoanRecordRecylerHolder onCreateViewHolder(final ViewGroup parent, int viewType) {
        View view = View.inflate(parent.getContext(), R.layout.activity_loan_record_item, null);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(parent.getContext(), ScheduleDetailsActivity.class);
                context.startActivity(intent);
            }
        });
        return new LoanRecordRecylerHolder(view);
    }

    @Override
    public void onBindViewHolder(LoanRecordRecylerHolder holder, int position) {

    }
}
